package day10_io_code.com.itheima.d3_transfer_stream;

import day10_io_code.com.itheima.d1_char_stream.FileReaderDemo2;

import java.io.*;

public class Demo2_InputStreamReader{
    public static void main(String[] args) {
        try (
                InputStream is = new FileInputStream("d:\\demo\\a.txt");
                Reader isr = new InputStreamReader( is, "utf-8");
                BufferedReader br = new BufferedReader(isr);
        ){
            String line;
            while ((line = br.readLine()) != null){
                System.out.println(line);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

}
